<?xml version="1.0"?>
<!--this file is used to translate the tag of my source to a intermediate format which mixes
openmath, book, etc.-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:om="http://www.openmath.org/OpenMath">
	<xsl:output method="xml"/>

	<xsl:template match="var">
		<om:OMOBJ cdbase="http://www.openmath.org/cd">
			<om:OMV>
				<xsl:attribute name="name">
					<xsl:apply-templates/>
				</xsl:attribute>
			</om:OMV>
		</om:OMOBJ>
	</xsl:template>



	<!--xsl:template match="quantityFunction">
		<xsl:choose>
			<xsl:when test="not(parent::quantityFunction)">
				<om:OMOBJ>
					<xsl:call-template name="quantityFunction"/>
				</om:OMOBJ>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="quantityFunction"/>
			</xsl:otherwise>
		</xsl:choose>.</xsl:template>

	<xsl:template name="quantityFunction">
		<om:OMA>
			<om:OMS>
				<xsl:attribute name="name">
					<xsl:value-of select="@name"/>
				</xsl:attribute>
				<xsl:attribute name="cd">
					<xsl:value-of select="@cd"/>
				</xsl:attribute>
				<xsl:if test="@name='divide'">
					<xsl:attribute name="style">
						<xsl:text>frac:big</xsl:text>
					</xsl:attribute>
				</xsl:if>
			</om:OMS>
			<xsl:apply-templates/>
		</om:OMA>
	</xsl:template-->


	<!--xsl:template match="pointer">
		<om:OMV>
			<xsl:attribute name="name">
				<xsl:value-of select="normalize-space(.)"/>
			</xsl:attribute>
		</om:OMV>

		<xsl:if test="@type">
			<math:mtext>
				<xsl:text>::</xsl:text>
				<xsl:value-of select="@type"/>
			</math:mtext>
		</xsl:if>
	</xsl:template>

	<xsl:template match="quantity">
		<xsl:choose>
			<xsl:when test="@type='number'">
				<om:OMI>
					<xsl:value-of select="normalize-space(.)"/>
				</om:OMI>
			</xsl:when>
			<xsl:when test="@type='length'">
				<om:OMV cdbase="http://www.openmath.org/cd">
					<xsl:attribute name="name">
						<xsl:value-of select="normalize-space(.)"/>
					</xsl:attribute>
				</om:OMV>
				<xsl:if test="@type">
					<math:mtext>
						<xsl:text>::</xsl:text>
						<xsl:value-of select="@type"/>
					</math:mtext>
				</xsl:if>
			</xsl:when>
			<xsl:otherwise>
				<om:OMI cdbase="http://www.openmath.org/cd">
					<xsl:value-of select="normalize-space(.)"/>
				</om:OMI>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template-->



	<!-- ********************************************************************
       
         Default rule (do NOT delete)
       
       ******************************************************************** -->

	<xsl:template match="*">
		<xsl:copy>
			<xsl:for-each select="@*">
				<xsl:copy/>
			</xsl:for-each>
			<xsl:apply-templates/>
		</xsl:copy>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. 保留所有权力.
<metaInformation>
<scenarios/><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->